package com.ruoyi.app.controller;

import com.ruoyi.app.domain.TypeFeedback;
import com.ruoyi.app.domain.UserFeedback;
import com.ruoyi.app.service.UserFeedbackService;
import com.ruoyi.app.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/userFeedback")
public class UserFeedbackController {

    @Autowired
    private UserFeedbackService userFeedbackService;

    /**
     * 添加反馈记录
     * @param userFeedback 反馈信息
     * @return 操作结果
     */
    @RequestMapping("add")
    public Result add(@RequestBody UserFeedback userFeedback) {
        return userFeedbackService.add(userFeedback);
    }

    /**
     * 查询类型
     */

    @RequestMapping("queryType")
    public List<TypeFeedback> queryType() {
        return userFeedbackService.listType();
    }
}
